import { randomInt } from 'crypto';
import { eventHandler } from 'h3';
import { sleep } from '~/utils/response';

export default eventHandler(async (event) => {
  let time = randomInt(5);
  await sleep(time * 1000);
  const data = await readBody(event);
  console.log('修改字典数据', JSON.stringify(data));
  return useResponseSuccess(null);
});
